#ifndef TEXTTOSPEECH_H
#define TEXTTOSPEECH_H


/**
 * 由于Python C API和QProcess之间的python解释器之间的冲突，这段代
 * 码暂时弃用，即取消通过多线程来调用QProcess而是直接采取混合编程的方式。
 */


#include <QObject>
#include <QProcess>

#define PYTHON "/home/mhc/anaconda3/envs/modelscope/bin/python3.7"
#define SCRIPT "/home/mhc/Code/tts-script/microsoft-tts/tts/python_cli_demo/mytts.py"

class TextToSpeech : public QObject
{
    Q_OBJECT

public:
    explicit TextToSpeech(QObject *parent = nullptr);
    ~TextToSpeech();

    void speak(const QString &text);


private:
    QProcess *m_process;
};

#endif // TEXTTOSPEECH_H
